public class LogIn {
    String username = "admin";
    String password = "123456";
    public void loginInfo(String username, String password)
            throws UserNameException,PassWordException{
        if(!this.username.equals(username)){
            throw new UserNameException("用户名异常！");
        }
        if(!this.password.equals(password)){
            throw new PassWordException("密码异常！");
        }
        System.out.println("登录成功！");
    }
}
